<template >
  <el-table-column v-for="item in columns" :key="item.prop" :label="columns.label" :prop="columns.prop">
    <my-colums v-if="item.children && item.children.length" :columns="item.children"> </my-colums>
    <!-- <el-table-column v-else :key="item.name" :label="item.label" :prop="item.prop">
    <template #default="scope">
      <slot :name="item.prop" :row="scope.row" :column="scope.column">{{ scope.row[scope.column.property] }}</slot>
    </template>
  </el-table-column> -->
  </el-table-column>

  <!-- <el-table-column :label="columns.label" :prop="columns.prop">
    <template v-for="item in columns.children" :key="item.id">
      <my-colums v-if="item.children && item.children.length" :columns="item">
      </my-colums>
      <el-table-column v-else :key="item.name" :label="item.label" :prop="item.prop">
        <template #default="scope">
          <slot :name="item.prop" :row="scope.row" :column="scope.column">{{ scope.row[scope.column.property] }}</slot>
        </template>
      </el-table-column>
    </template>
  </el-table-column> -->
</template>

<script>
import { httpGet, httpPost, httpPut, httpDel } from '/@/utils/request'
import { onMounted, ref, useSlots } from 'vue'
export default {
  mame: 'MyColums',
}
</script>
<script setup>
import {} from 'vue'
const props = defineProps({
  columns: {
    type: Array,
    default: () => {
      return []
    },
  },
})
const { columns } = props
console.log(columns, '12')
</script>

<style lang="css" scoped>
</style>